#include<stdio.h>
int main()
{  	  	     
	int sum=0,c,y,m,d,fib;
	printf("Please Input the Date:\n");
	scanf("%d-%d-%d",&y,&m,&d);//1
	if(y%400==0||y%100!=0&&y%4==0)//2
		fib=29;
	else fib=28;
	if(m>=1&&m<=12){//1
	for(c=1;c<=m;c++)//1
		switch(c-1)
		{  	  	     
           case 1:
		   case 3:
		   case 5:
		   case 7:
		   case 8:
		   case 10:sum+=31;break;//1
		   case 2:sum+=fib;break;
		   case 4:
		   case 6:
		   case 9:
		   case 11:sum+=30;break;
		}
		sum+=d;
		printf("Result=%d\n",sum);
	}
	else
	printf("Input error!\n");//1
	return 0;
}  	  